<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>武林英雄</title>
<script type="text/javascript" src="../../js/common.js"></script>
<script type="text/javascript" src="../../js/ajax.js"></script>
<script type="text/javascript" src="../../js/register.js"></script>
<style type="text/css">
*{margin:0px; padding:0px;} /* ff */   
*html{margin:0px; padding:0px; } /* IE6 */ 
*+html{margin:0px; padding:0px;} /* IE7 */ 
img {border:0; margin:0px;} 
ul,li{list-style:none; margin:0px; padding:0px;} 
body {font-family:"宋体"; font-size:12px; background-color:#ffffff; color:#fff; line-height:18px;}
.e47240{color:#e47240;}
.fw{font-weight:bold; padding-right:5px;}
.yx{width:590px; height:544px; overflow:hidden; position:absolute; top:50%; left:50%; margin:-272px 0 0 -295px;}
.top{width:590px; height:216px; overflow:hidden; margin:0px;}
.mid{background:url(../../images/hero/yx_m.jpg) 0 0 no-repeat; width:590px; height:163px; overflow:hidden; margin:0px; padding-top:10px}
.mid td{height:31px; overflow:hidden;}
.login_m{margin:0px 5px; width:155px;} 
.login_m_input01{background:url(../../images/hero/yx_input01.gif) 0 0 no-repeat; height:15px; width:152px; padding-top:3px; border:none; padding-left:2px;}
.login_m_input02{background:url(../../images/hero/yx_input02.gif) 0 0 no-repeat; height:15px; width:72px; padding-top:3px; border:none; padding-left:2px;}
.btm{width:590px; height:218px; overflow:hidden; margin:0px;}
.boxOK { color: green; }
.boxError { color: red; }
a{color:#200000; font-weight:blod; text-decoration:none}
a:hover{color:#200000; font-weight:blod; text-decoration:underline;}
</style>
</head>

<body>
<div class="yx">
  
	<div class="top"><img src="../../images/hero/yx_t_1.jpg" border="0" usemap="#Map2" />
<map name="Map2" id="Map2"><area shape="rect" coords="555,10,576,29" href="javascript:;" onclick="top.document.getElementById('cover').style.display='none';top.server_select_yx('close');" /></map></div>	
	<div class="mid">
		<ul style="margin-top:30px;">		
	<?
	class lower_user_reg
	{
		var $key_code = 'sdfs$#%34123423434%%@@@3^$^!@#dfgf45wf33^^^44'; // 私钥
		var $postUrl = "http://u.9wee.com/index.php?module=event&action=lower_user_reg";
		function postQuery ( $postVars )
		{
			if(is_array($postVars))
			{
				foreach($postVars as $key=>$value)
				{
					$postData .= '&'.$key.'='.$value;
				}
				$postUrl = $this->postUrl.$postData;//echo $postUrl;
				$results = file_get_contents ( $postUrl );
				return $results;
			}
		}
		/**发送请求
		*@param string $apply_id 推广员ID
		*@param string $reg_time 注册时间
		*@param string $reg_ip 推广员ID
		*@param string $lower_user_account 下线账号
		*@param string $lower_user_nickname 下线昵称
		*@param string $game_id 下线所属游戏
		*@param string $upper_id 渠道ID
		*@param int money 游戏币
		*/
		function send($apply_id,$reg_time,$reg_ip,$lower_user_account,$lower_user_nickname,$game_id,$upper_id)
		{
			$game_id = 100;
			if ( is_numeric($apply_id) && strlen($apply_id) >= 8 )
			{
				$round_code = rand(1,10000);
				$string = $apply_id.$reg_time.$reg_ip.$round_code.$this->key_code.$lower_user_account.$lower_user_nickname.$game_id;
				$md5_code = md5($string);
				$postArr = array (
					'apply_id' => $apply_id,
					'reg_time' => $reg_time,
					'reg_ip'=>$reg_ip,
					'round_code' => $round_code,
					'lower_user_account' => $lower_user_account,
					'lower_user_nickname'=>$lower_user_nickname,
					'md5_code' => $md5_code,
					'game_id'=>$game_id,
					'upper_id'=>$upper_id
					);//echo "string1=".$string."<br>";
				$result = $this->postQuery ( $postArr );
			}
		}
	}

		if(!empty($_GET['q'])){
			$q_ = explode("_",$_GET['q']);			
			if($q_[3] == 1){
				$_GET['q'] = $q_[0]."_".$q_[1]."_".$q_[2];
				$q = explode("_",$_GET['q']);
				$apply_id = $q['0'];
				$game_id = $q['1'];
				$upper_id = $q['2'];
				$reg_time = time();
				$reg_ip = $_SERVER['REMOTE_ADDR'];
				$lower_user_account = $_SESSION['union_username'];
				$lower_user_nickname = $_SESSION['union_nickname'];	

				$lower_user_reg = new lower_user_reg;	
				$lower_user_reg->send($apply_id,$reg_time,$reg_ip,$lower_user_account,$lower_user_nickname,$game_id,$upper_id);
			}
		}

	$serverlist = @file_get_contents("https://passport.9wee.com/payment/tools/serverlist.php");
	$serverlist = unserialize($serverlist);
    $sg_list=$serverlist['103'];
	foreach ($sg_list as $key=>$value) {
		$backurl=urlencode('http://'.$_SERVER['HTTP_HOST'].'/game/?game=103');
	?>
      <li style="background:url(../../images/hero/xin_bg_1.gif) 0 0 no-repeat; margin-left:140px; height:26px; line-height:26px; padding-left:50px; color:#f00; font-weight:bold; margin-top:15px;"><a href="http://<? echo $key;?>?backurl=<? echo $backurl;?>" target="_blank"><? echo $value;?></a></li>
   <?
	}	
	?>
				
				</ul>
	</div>
	<div class="btm"><img src="../../images/hero/yx_b.jpg" border="0" usemap="#Map" />
<map name="Map" id="Map">
  <area shape="rect" coords="187,9,352,50" href="#"  />
</map></div>

</div>
</body>
</html>
